from broker_api import BrokerAPI;
# 初始化券商API
broker = BrokerAPI(
    api_key="你的API密钥",
    secret_key="你的密钥",
    account_id="你的账户ID"
)
print("hello world")
# 获取账户信息
account_info = broker.get_account_info()
print("账户信息:", account_info)

# 获取当前持仓
positions = broker.get_positions()
print("当前持仓:", positions)

# 获取市场行情
market_data = broker.get_market_data("000001.SZ")
print("行情数据:", market_data)

# 下单
order_result = broker.place_order(
    symbol="000001.SZ",
    direction="BUY",
    volume=100,
    price=10.5
)
print("下单结果:", order_result)

# 查询账户余额
balance = broker.get_account_balance()
print("账户余额:", balance)
